import uvicorn
import os
import sys
from dotenv import load_dotenv

# Load environment variables
load_dotenv()

def main():
    print("🚀 Starting AI Video Hub Server...")
    print("📖 Loading configuration from .env file...")
    print(f"🌐 Server will be available at http://127.0.0.1:8000")
    print("🔧 API documentation available at http://127.0.0.1:8000/docs")
    print("\nPress Ctrl+C to stop the server\n")
    
    # Run the FastAPI application
    uvicorn.run(
        "main:app",
        host="127.0.0.1",
        port=8000,
        reload=True,
        reload_dirs=["."],
        log_level="info"
    )

if __name__ == "__main__":
    main()
